/*
 * Copyright (C) 2010 Johan Waldeback
 *  
 * This file is part of the OpenFMS project (http://www.openfms-project.org)
 * 
 * OpenFMS is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */


#ifndef __INPUTVIEWERFRAME_H__
#define __INPUTVIEWERFRAME_H__

#include "InputDevice.h"
#include <wx/frame.h>
#include <wx/string.h>
#include <wx/button.h>
#include <wx/textctrl.h>
#include <wx/timer.h>

namespace OpenFms {

class InputViewerFrame : public wxFrame
{
private:
	enum { 
		ID_EDIT = 100,
		ID_BROWSE,
		ID_LOAD, 
		ID_TIMER,
	    ID_FIRSTBAR = 200
	};
	static const size_t m_nChannelBars=16;
private:
	void DoLoad();
	wxTimer *m_timer;
	InputDevice m_input;
public:
	InputViewerFrame( const wxString &title );
	~InputViewerFrame();
	void onBrowse( wxCommandEvent &evt );
	void onLoad( wxCommandEvent &evt );
	void onTimer( wxTimerEvent &evt );
	void setBar( size_t bar, float value );
};

} // namespce OpenFms
#endif // __INPUTVIEWERFRAME_H__
